<?php

/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator          |
    |              on 2018-07-17 15:20:11              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
namespace MmqmMarket\controller\mobile;

defined("IN_IA") || die("Access Denied");
class StoreIndex extends \MmqmMarket\controller\BaseController
{
    public function __construct($Site, $arguments)
    {
        parent::__construct($Site, $arguments);
        method_exists($this, $GLOBALS["_GPC"]["ac"]) && ($this->{$GLOBALS["_GPC"]["ac"]}() && die || die);
        $GLOBALS["PARAMS"] = array("store" => pdo_get($this->table_stores, array("id" => $GLOBALS["_GPC"]["store_id"]), array("title", "address", "tel")));
        include $this->template();
    }
    private function nextPageGoods()
    {
        die(json_encode(array("goods" => \MmqmMarket\model\SQL::all("\nSELECT *\nFROM `@#__M_goods`\nWHERE `storeid` = :store_id\n  && `status` = 1\n  && `deleted` = 0\nORDER BY `displayorder` DESC\nLIMIT 20\nOFFSET " . intval($GLOBALS["_GPC"]["exists"]), array(":store_id" => intval($GLOBALS["_GPC"]["store_id"]))))));
    }
    private function updateCart()
    {
        \MmqmMarket\model\Cart::update($GLOBALS["_GPC"]["MarketID"], $GLOBALS["_GPC"]["StoreID"], $GLOBALS["_GPC"]["GoodsID"], $GLOBALS["_GPC"]["ChangeCount"]);
    }
}